/*
 * Raca.java
 *
 * Created on October 7, 2007, 10:49 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package petstore.model;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Entity class Raca
 * 
 * @author Tom Hayden
 */
@Entity
@Table(name = "raca")
@AttributeOverrides( {
        @AttributeOverride(name="id", column=@Column(name="cdraca")),
        @AttributeOverride(name="description", column=@Column(name="nmraca")),
        @AttributeOverride(name="active", column=@Column(name="ativo"))
    })
public class Raca extends CodeData {

    @ManyToOne
    @JoinColumn(name="cdporte")
    private Porte porte;

    @ManyToOne
    @JoinColumn(name="cdespecie")
    private Especie especie;

    /** Creates a new instance of Raca */
    public Raca() {
    }

    public Porte getPorte() {
        return porte;
    }

    public void setPorte(Porte porte) {
        this.porte = porte;
    }

    public Especie getEspecie() {
        return especie;
    }

    public void setEspecie(Especie especie) {
        this.especie = especie;
    }

}
